<?php
// +----------------------------------------------------------------------
// | ThinkCMF [ WE CAN DO IT MORE SIMPLE ]
// +----------------------------------------------------------------------
// | Copyright (c) 2013-2017 http://www.thinkcmf.com All rights reserved.
// +----------------------------------------------------------------------
// | Author: Dean <zxxjjforever@163.com>
// +----------------------------------------------------------------------
// API 模板文件，可以复制
namespace api\resource\controller;

use think\Db;
use think\Request;
use think\Validate;
use cmf\controller\RestBaseController;

class Biao35Controller extends RestBaseController
{


    public function one($data)
    {

        //查 这个表的数据
        @$new_data = $data[0]['content'];
        if (empty($new_data)) {
            return '';
        }
        @$text1 = $new_data->text1;
        @$text1 = json_decode($text1);

       $html = '
       <div style="width: 650px;margin: 0 auto;">
            <div style="font-size: 16px;font-weight: 600;margin-bottom: 15px;">十三、工作进度安排</div>
            <table border="1" cellspacing="0px" cellpadding="5px" width="650">
                <thead>
                <tr>
                    <td>序号</td>
                    <td>起止时间</td>
                    <td>阶段目标、主要内容及成果</td>
                </tr>
                </thead>
                <tbody>';

                @$i = 1;
                foreach (@$text1 as $v) {
                    $html .='
                                            <tr>
                                                <td>'.@$i.'</td>
                                                <td>'.@$v->text1.'</td>
                                                <td>'.@$v->text2.'</td>
                                            </tr>
                                            ';
                    $i++;
                }



                $html .='
                </tbody>
            </table>
        </div>
        ';

            return $html;

    }



}
